package com.loongtech.bi.entity.player;

import com.loongtech.core.util.Time;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name = "da_playtime_tag")
public class EntityDaPlayTimeTag implements Serializable {
	private static final long serialVersionUID = 2L;

	@Id
	private Date day; // 日期
	@Id
	private String serverid;
	@Id
	private String channelid;
	@Id
	private String platformid;
    @Id
    private String tagvalue;
	@Column(columnDefinition="bigint(20) NOT NULL default 0")
	private long sumplaytime;
	@Column(columnDefinition="int(11) NOT NULL default 0")
	private int useridnum;
	@Column(columnDefinition="bigint(20) NOT NULL default 0")
	private long da_playtime;
	
	/**
	 * 返回主键字符串
	 * @return
	 */
	public String getKey() {
		return Time.getDateStr(day) + "-" + tagvalue;
	}

	public Date getDay() {
		return day;
	}

	public void setDay(Date day) {
		this.day = day;
	}

	public String getServerid() {
		return serverid;
	}

	public void setServerid(String serverid) {
		this.serverid = serverid;
	}

	public String getChannelid() {
		return channelid;
	}

	public void setChannelid(String channelid) {
		this.channelid = channelid;
	}

	public String getPlatformid() {
		return platformid;
	}

	public void setPlatformid(String platformid) {
		this.platformid = platformid;
	}

	public long getSumplaytime() {
		return sumplaytime;
	}

	public void setSumplaytime(long sumplaytime) {
		this.sumplaytime = sumplaytime;
	}

	public int getUseridnum() {
		return useridnum;
	}

	public void setUseridnum(int useridnum) {
		this.useridnum = useridnum;
	}

	public long getDa_playtime() {
		return da_playtime;
	}

	public void setDa_playtime(long da_playtime) {
		this.da_playtime = da_playtime;
	}

    public String getTagvalue() {
        return tagvalue;
    }

    public void setTagvalue(String tagvalue) {
        this.tagvalue = tagvalue;
    }
}